// 装饰类 Decorator
function mixins(...list) {
  return function (target) {
    Object.assign(target.prototype, ...list)
  }
}

const Foo = {
  foo() {
    return 1
  }
}

@mixins(Foo)
class MyClass {

}

let obj = new MyClass()
console.log(obj.foo())